if(!jsx3.lang.Class.forName("ux.cdb.admin.system.school.builder.step1.SchoolInfo")) {
    jsx3.lang.Class.defineClass("ux.cdb.admin.system.school.builder.step1.SchoolInfo",
            ux.megatron.gui.WizardPanel,
            null,
            function (block) {
                /**
                 * instance initializer
                 * @param strName {String} unique name distinguishing this object from all other JSX GUI objects in the JSX application
                 * @param vntLeft {int|String} either a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
                 * @param vntTop {int|String} either a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
                 * @param vntWidth {int|String} either a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
                 * @param vntHeight {int|String} either a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
                 * @param strHTML {String} Text/HTML markup to place in the jsx3.gui.Block instance
                 */
                block.prototype.init = function(strName, vntLeft, vntTop, vntWidth, vntHeight, strHTML) {
                    //call constructor for super class (the super expects the name of the object and the function that it is an instance of)
                    this.jsxsuper(strName, vntLeft, vntTop, vntWidth, vntHeight, strHTML);
                };

                block.prototype.initialize = function(msg) {
                };
				
	            block.prototype.property = function(name, token) {
	                return ux.megatron.Main.getServer().getDynamicProperty(name, token);
	            };

                block.prototype.initialize = function() {
                    var me = this;
                    this.builder = this.getAncestorOfType("ux.cdb.admin.system.school.builder.Builder");
					this.wizard = this.getAncestorOfType("ux.megatron.gui.SteppedWizard");
                    this.paneMaster = this.get("paneMaster"); // include panel
					if(!this.wizard.cacheCDF){ //cache of steps.
						this.wizard.cacheCDF = { step1 : null, step2 : null, step3 : null};
					}else if(this.wizard.cacheCDF.step1){
						//this.paneMaster.setData(this.wizard.cacheCDF.step1);
					}
					var cache = ux.cdb.admin.CommonCache.getInstance();
					var field1 = this.get('fieldOfProperty').getChild(1);
					var field2 = this.get('fieldOfCategory1').getChild(1);
					var field3 = this.get('fieldOfCategory2').getChild(1);
					var field4 = this.get('fieldOfProvince').getChild(1);
					setTimeout(function(){
						field1.setSourceXML(cache.getCache('CommonCache_SCHOOL_PROPERTY'));
						field2.setSourceXML(cache.getCache('CommonCache_SCHOOL_CATEG1'));
						field3.setSourceXML(cache.getCache('CommonCache_SCHOOL_CATEG2'));
						field4.setSourceXML(cache.getCache('CommonCache_PROVINCE'));
						field1.repaint();
						field2.repaint();
						field3.repaint();
						field4.repaint();
					},10);
/* @JSC :: begin DEBUG */
					jsx3.log("SchoolInfo#initialize : paneMaster = " + this.paneMaster);
					jsx3.log('wizard.editMode : ' + this.wizard.editMode);
					jsx3.log('modify title : ' + this.property('@cdb@system@schoolBuilder@dialogTitleModify'));
/* @JSC :: end */
					if(this.wizard.editMode == 'Modify'){
						this.builder.getDescendantOfName('windowBar').setText(this.property('@cdb@system@schoolBuilder@dialogTitleModify'),true);
						//this.wizard.setEnableStepJump(true);
						this.wizard.detailCDF = {school:null, communication:null, account:null};
						if(!this.wizard.detailCDF.school)
							this.doModify(this.wizard.selectedNode);
						else
							this.paneMaster.setDataByObject(this.wizard.detailCDF.school);
/* @JSC :: begin DEBUG */
						jsx3.log('this.wizard.detailCDF.school : ' + dwr.util.toDescriptiveString(this.wizard.detailCDF.school,5));
/* @JSC :: end */
					}else{
						this.builder.getDescendantOfName('windowBar').setText(this.property('@cdb@system@schoolBuilder@dialogTitleAdd'),true);
					}
                };
				
                block.prototype.doModify = function(node) {
					var _self = this;
/* @JSC :: begin DEBUG */
					jsx3.log('currentNode : ' + node);
/* @JSC :: end */
					ux.megatron.util.Dwr.callDwr("SchoolInfoUCC","getSchoolDetailInfo",[node.getAttribute('partyId')],this,
						function(data){
/* @JSC :: begin DEBUG */
							jsx3.log('SchoolInfoUCC#getSchoolDetailInfo data : '+dwr.util.toDescriptiveString(data, 5));
/* @JSC :: end */
							if (data != null && typeof data == 'object') {
								data = data.content.data;
								var tmpCDF = jsx3.xml.CDF.Document;
								if(data[0] && typeof(data[0]) == 'object'){
									//this.wizard.detailCDF.school = tmpCDF.newDocument();
									//this.wizard.detailCDF.school.insertRecord(data[0],null,false);
									this.wizard.detailCDF.school = data[0];
									this.paneMaster.setDataByObject(this.wizard.detailCDF.school);
								}
								if(data[1] && typeof(data[1]) == 'object'){
									//this.wizard.detailCDF.communication = tmpCDF.newDocument();
									//this.wizard.detailCDF.communication.insertRecord(data[1],null,false);
									this.wizard.detailCDF.communication = data[1];
								}
							}
						});
				};

                block.prototype.onNext = function(objWIZARD, objBUTTON, objEVENT, strCURRENTPANEL) {
                    if(this.checkInput()) {
						var _data = this.paneMaster.getData();
/* @JSC :: begin DEBUG */
						jsx3.log("SchoolInfo#onNext : current data : " + _data);
/* @JSC :: end */
						if(this.wizard.cacheCDF.step1)
							delete this.wizard.cacheCDF.step1;
                        this.wizard.cacheCDF.step1 = _data;
/* @JSC :: begin DEBUG */
						jsx3.log("SchoolInfo#onNext : current cacheData step1 : " + this.wizard.cacheCDF.step1);
/* @JSC :: end */
						//TODO: get and cache current data,used to transaction processing.
                        return null; 
                    } else {
                        return "NONE";
                    }
                };
				
				block.prototype.onStepJump =  function(objWIZARD,objSTEP,objEVENT,strCURRENTPANEL){
/* @JSC :: begin DEBUG */
					jsx3.log('SchoolInfo@onStepJump...');
/* @JSC :: end */
					return this.onNext();
				};

                block.prototype.onPrev = function(objWIZARD, objBUTTON, objEVENT, strCURRENTPANEL) {
                    return null; // return "NONE" to not advance panels
                };

                block.prototype.onRevert = function(objWIZARD, objBUTTON, objEVENT, strCURRENTPANEL) {
                    return null; // return "NONE" to not last status
                };

                block.prototype.onCancel = function(objWIZARD, objBUTTON, objEVENT, strCURRENTPANEL) {
					this.builder.onClose();
                    return null; // return "NONE" to not advance panels
                };

				block.prototype.onFinish = function(objWIZARD, objBUTTON, objEVENT, strCURRENTPANEL){
					if(this.checkInput()) {
						var _data = this.paneMaster.getData();
						if(this.wizard.cacheCDF.step1) 
							delete this.wizard.cacheCDF.step1;
						this.wizard.cacheCDF.step1 = _data;
						this.builder.doSave();
                    } else {
                        return "NONE";
                    }
				};

                block.prototype.onCustomNav = function(objWIZARD, objBUTTON, objEVENT, strCURRENTPANEL) {
                    return null; // return "NONE" to not advance panels
                };

                block.prototype.onBeforeShow = function(objWIZARD, objBUTTON, objEVENT, strLASTPANEL) {
                    if(!this.getChild(0)) {
                        var me = this;
                        ux.megatron.Main.loadUIResourceAsync(me, "ux.cdb.admin","ux/cdb/admin/system/school/builder/step1/ui/SchoolInfoContent.xml", me, me.initialize);
                    }
                    return null; // return "NONE" to not advance panels
                };

                block.prototype.onAfterHide = function(objWIZARD, objBUTTON, objEVENT, strNEXTPANEL) {
                    return null; // return "NONE" to not advance panels
                };

                block.prototype.loadSchoolInfo = function() {
                    var rootDir = "ux/cdb/admin/system/school/docs/";
                    var namespace = "ux.cdb.admin";
                    ux.megatron.Main.loadResource(rootDir + "SchoolDetail.xml", namespace, "SchoolDetail_0302", "xml");
                };
				
				block.prototype.checkInput = function() {
/* @JSC :: begin DEBUG */
					jsx3.log("SchoolInfo#checkInput");
/* @JSC :: end */
					var errorMsgs = this.paneMaster.doValidate();
                    this._message = errorMsgs === null ? null : (errorMsgs[0].label ? errorMsgs[0].label + " : " +errorMsgs[0].message : errorMsgs[0].message);
                    if(this._message == null) {
/* @JSC :: begin DEBUG */
						jsx3.log("SchoolInfo#checkInput success!");
/* @JSC :: end */
                        this.wizard.getMessageLabel().setText("&nbsp;");
                        return true;
                    } else {
/* @JSC :: begin DEBUG */
						jsx3.log("SchoolInfo#checkInput failed!");
/* @JSC :: end */
                        var tip = ux.megatron.Main.getServer().getDynamicProperty("@cdb@system@schoolBuilder@schoolInfoValidaeMSG");
                        this.wizard.getMessageLabel().setText(this._message ? this._message : tip);
                        return false;
                    }
                };
            }
    );
}